package com.bidepan.spring6.springi18n;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Date;
import java.util.Locale;

public class ResourceI18n{
    public static void main(String[] args){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");

        Object[] objs = new Object[]{"彼得大帝",new Date().toString()};
        String hello = context.getMessage("hello",objs, Locale.US);
        System.out.println(hello);
    }
}
